package hk.linkcredit.walletservice.wallet.service;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import hk.linkcredit.walletservice.wallet.domain.entity.WalletAccount;
import hk.linkcredit.walletservice.wallet.domain.vo.WalletAccountInfo;
import hk.linkcredit.walletservice.wallet.domain.vo.WalletAccountReq;
import hk.linkcredit.walletservice.wallet.domain.vo.WalletAccountVo;
import hk.linkcredit.walletservice.wallet.domain.vo.WalletStatusReq;

import java.math.BigDecimal;

/**
 * <p>
 * 钱包账户表 服务类
 * </p>
 *
 * @author LinkCredit
 * @since 2022-06-10 01:23:44
 */
public interface WalletAccountService extends IService<WalletAccount> {

    WalletAccountVo getWalletAccount(String custNo);

    WalletAccountInfo getWalletAccountInfo(String custNo);

    void checkWalletBalance(String walletType, BigDecimal amount, WalletAccountInfo walletAccount);

    void updateWalletAccount(WalletAccountReq walletAccountReq);

    JSONObject splitAmount(String walletStatus, BigDecimal actualAmt, BigDecimal availableBalance, BigDecimal availableBonus);

    void initWalletAccountAll(String custNo);

    void updateWalletStatus(WalletStatusReq walletStatusReq);

    JSONObject getCustomersWithBalance();

    String getWalletType(String fundsType);
}
